<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        console.log(window);
        //1.window自带的方法
        window.alert("window.alert");
        prompt("请输入");
        //确认框 参数为提示文本,自带确认和取消按钮,只有点击确认时,返回true,取消返回false
        var isClose = window.confirm("是否要关闭");
        console.log(isClose);

        //2.全局变量和全局函数是window的属性和方法
        var a = 100;
        function f1(){
            console.log("f1")
        }
        console.log(window.a);
        window.f1();
        console.log(window);
    </script>
</head>
<body>
    
</body>
</html>